package com.knowledge.graph.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author jiwenlong
 * @version 1.0
 * @description: 班级对象
 * @date 2024/1/4 17:44
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("grade")
public class Grade {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private String description;

    private Integer member;
    private Integer teacherId;

    private Integer courseId;

    private String invitationCode;

    public Grade(String name, String description, Integer teacherId) {
        this.name = name;
        this.description = description;
        this.teacherId = teacherId;
        this.member = 0;
    }

    public Grade(Integer gradeID,String name,String description) {
        this.id = gradeID;
        this.name = name;
        this.description = description;
    }

    public Grade(Integer gradeID,Integer courseId) {
        this.id = gradeID;
        this.courseId = courseId;
    }

    public Grade(Integer gradeID,String invitationCode) {
        this.id = gradeID;
        this.invitationCode = invitationCode;
    }
}
